<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var arr1 = ['1','2','3'];
    var arr2 = ['a','b','c'];
    // 数组拼接concat,对原来的数组没有影响,把数组B的数据接口打碎,挨个把每个元素添加到数组A上
    var strings = arr1.concat(arr2);
    console.log(strings)

    // push 对源数组有影响,把数组B整个结构添加到数组A上面
    var arr3 = ['1','2','3'];
    var arr4 = ['a',['b','c'],'d'];
    arr3.push(arr4)
    console.log(arr3)
    console.log(arr4)


    // 把数组以 # 的方式组合成字符串,并去掉两遍 [ ]
    var s = [1].join("#");
    console.log(s)

    // es 展开语法
    var esarr = [...arr1,...arr2]
    console.log(esarr);

    let s1 = {...arr1}
    console.log(s1[0]);
</script>
</html>
